package com.watermark;

import com.google.common.io.Files;
import com.watermark.util.WriteImageWatermarkUtil;

import java.io.File;
import java.io.IOException;

public class WaterMarkTest {

    public static void main(String[] args) {
        //测试打水印
        testWritePictureWatermark();
    }

    /**
     * 测试 向图片打水印*
     */
    private static void testWritePictureWatermark(){
        File images = new File("C:\\testFile\\测试图片.png");
        try {
            byte[] bytes = Files.toByteArray(images);
            WriteImageWatermarkUtil.pictureWatermark(bytes,"测试水印");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
